﻿<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">帖子管理</div>

        <div class="layui-card-body">
            <div class="layui-row layui-col-space10">
                <div class="layui-form">
                    <div class="layui-col-xs4">
                        <div class="layui-form-item">
                            <label class="layui-form-label">帖子类型</label>
                            <div class="layui-input-block">
                                <select name="postType" id="cmb_PostType">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="layui-col-xs4">
                        <div class="layui-form-item">
                            <label class="layui-form-label">帖子状态</label>
                            <div class="layui-input-block">
                                <select name="postStatus" id="chb_PostStatus">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="layui-col-xs4">
                        <div class="layui-form-item">
                            <label class="layui-form-label">排序</label>
                            <div class="layui-input-block">
                                <select name="postSort" id="rdo_PostSort">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="layui-col-xs2 layui-col-xs-offset10">
                        <button class="layui-btn layui-btn-fluid" id="Select">搜索</button>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <table id="data_PostManage" lay-filter="postManage"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tpl_PostStatus">
    {{# if(d.IsTop){ }}
    <span class="layui-badge layui-bg-black">置顶</span>
    {{# } }}
    {{# if(d.IsEnd){ }}
    <span class="layui-badge" style="background-color:#5FB878;">已结</span>
    {{# }else{ }}
    <span class="layui-badge" style="background-color:#999;">未结</span>
    {{# } }}
    {{# if(d.IsCream){ }}
    <span class="layui-badge layui-bg-red">精贴</span>
    {{# } }}
</script>

<script type="text/html" id="tpl_Operate">
    <div class="layui-btn-group">
        {{# if(d.IsTop){ }}
        <button class="layui-btn layui-btn-xs" lay-event="top">取消置顶</button>
        {{# }else{ }}
        <button class="layui-btn layui-btn-xs" lay-event="top">顶</button>
        {{# } }}
        {{# if(d.IsEnd){ }}
        <button class="layui-btn layui-btn-xs layui-btn-warm" lay-event="end">取消结帖</button>
        {{# }else{ }}
        <button class="layui-btn layui-btn-xs layui-btn-warm" lay-event="end">结</button>
        {{# } }}
        {{# if(d.IsCream){ }}
        <button class="layui-btn layui-btn-xs layui-btn-primary" lay-event="cream">取消加精</button>
        {{# }else{ }}
        <button class="layui-btn layui-btn-xs layui-btn-primary" lay-event="cream">精</button>
        {{# } }}
        <button class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete">删</button>
    </div>
</script>

<script type="text/html" id="tpl_PostType">
    {{# layui.each(d,function(index,item){ }}
    <option value="{{item.Value}}">{{item.Text}}</option>
    {{# }) }}
</script>

<script type="text/javascript">
    layui.cache.module = {
        moduleName: 'postManage'
    }
</script>